package com.walllee.moudle.monitor;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

public class MonitorDataBaseAction extends  ActionSupport{
	private static final long serialVersionUID = -5666749595061407589L;
	private MonitorDatabaseDAO dao ;
	private List<MonitorDataBase> datas = new ArrayList<MonitorDataBase>() ;
	private String node ;
	
	public String List() throws Exception{
		if ( node != null && "root".equalsIgnoreCase(node)){
			datas = dao.getAllMonitorDataBase() ;
		}else{
			datas = new ArrayList<MonitorDataBase>();
		}
		return "tree" ;
	}

	public List<MonitorDataBase> getDatas() {
		return datas;
	}

	public void setDao(MonitorDatabaseDAO dao) {
		this.dao = dao;
	}

	public String getNode() {
		return node;
	}

	public void setNode(String node) {
		this.node = node;
	}

}
